package com.neusoft.javafeatures9.mail;

import cn.hutool.extra.mail.GlobalMailAccount;
import cn.hutool.extra.mail.MailAccount;
import cn.hutool.extra.mail.MailUtil;

public class TestSendMail {
    public static void main(String[] args) {
        MailAccount  mailAccount = GlobalMailAccount.INSTANCE.getAccount();
        mailAccount.setAuth(true);
        mailAccount.setSslEnable(true);
        mailAccount.setFrom("pmo@xxxxxxxx.com");
        mailAccount.setPass("OURSLOOKxxxxxxxxx2020");
        MailUtil.send(mailAccount, "xxxxxxxx@163.com", "subject", "contect", true);
        System.out.println("发送成功");
    }
}
